#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define endl '\n'
const int N = 1e7 + 5;

int n, m;
int np[N];
int f[N];
ll sum[N];
vector<int> primes;
void init(int n) {
  np[1] = 1;
  f[1] = 1;
  rep(i, 2, n) {
    if (!np[i]) {
      primes.push_back(i);
      f[i] = i - 1;
    }
    for (int j : primes) {
      ll k = 1ll * j * i;
      if (k > n) break;
      np[k] = 1;
      if (i % j == 0) {
        f[k] = j * f[i];
        break;
      } else
        f[k] = f[j] * f[i];
    }
  }
  sum[1] = 1;
  rep(i, 2, n) sum[i] = sum[i - 1] + f[i] * 2;
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n;
  init(n);
  ll ans = 0;
  for (int p : primes) {
    int x = n / p;
    ans += sum[x];
  }
  cout << ans;
  return 0;
}